<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>countDown</title>
    <style>
      div {
        margin: 0 auto;
        width: 840px;
        height: 420px;
        color: red;
        background: url(./自愿上班.jpg) no-repeat center / cover;
        padding: 10px 150px;
        box-sizing: border-box;
      }
    </style>
  </head>
  <body>
    <div>
      <h3 style="font-size: 30px">距离五一放假还有</h3>
      <p class="countDown" style="font-size: 30px"></p>
    </div>
    <script src="./utils.js"></script>
    <script>
      setInterval(function () {
        var curr = new Date();
        var tar = new Date(2023, 3, 28, 18, 00, 00);
        var res = diffTime(curr, tar);
        console.log(res);
        var countDown = document.querySelector('.countDown');
        countDown.innerHTML = res;
      }, 1000);
    </script>
  </body>
</html>
